//package org.jeecg.modules.zcgl.tencent.controller;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.jeecg.common.api.vo.Result;
//import org.jeecg.common.system.base.controller.JeecgController;
//import org.jeecg.common.system.query.QueryGenerator;
//import org.jeecg.common.system.util.JwtUtil;
//import org.jeecg.modules.zcgl.entity.OrderDetails;
//import org.jeecg.modules.zcgl.enums.AttentionPayStatusEnum;
//import org.jeecg.modules.zcgl.service.IOrderDetailsService;
//import org.jeecg.modules.zcgl.tencent.config.CheckLogin;
//import org.jeecg.modules.zcgl.tencent.service.ICustomerAttentionService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.servlet.http.HttpServletRequest;
//import java.util.List;
//
///**
// *
// */
//@Api(tags = "缴费记录")
//@RestController
//@RequestMapping("/tencent/orderDetails")
//@Slf4j
//public class OrderDetailsController extends JeecgController<OrderDetails, IOrderDetailsService> {
//
//    @Autowired
//    private IOrderDetailsService orderDetailsService;
//    @Autowired
//    private ICustomerAttentionService customerAttentionService;
//
//    /**
//     * 分页列表查询
//     *
//     * @param orderDetails
//     * @param pageNo
//     * @param pageSize
//     * @param req
//     * @return
//     */
////	@AutoLog(value = "zcgl_customer_attention-分页列表查询")
//    @CheckLogin
//    @ApiOperation(value = "查询缴费记录", notes = "查询缴费记录")
//    @GetMapping(value = "/queryPaymentRecords")
//    public Result<?> queryPaymentRecords(OrderDetails orderDetails,
//                                         @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
//                                         @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
//                                         HttpServletRequest req) {
//
//        String attentionId = JwtUtil.getUserNameByToken(req);
//
//        List<String> customerIds = customerAttentionService.queryCustomerIdsByAttentionId(attentionId);
//        if (customerIds == null || customerIds.size() == 0) {
//            return Result.ok(new Page<>());
//        }
//
////       orderDetails.setAttentionId(attentionId);
//        orderDetails.setPayStatus(AttentionPayStatusEnum.SUCCESSFUL.getStatus());
//        QueryWrapper<OrderDetails> queryWrapper = QueryGenerator.initQueryWrapper(orderDetails, req.getParameterMap());
////       queryWrapper.lambda().in(OrderDetails::getCustomerId, customerIds);
//        queryWrapper.and(i -> i.apply(QueryGenerator.getCustomerSql(customerIds)));
//        Page<OrderDetails> page = new Page<OrderDetails>(pageNo, pageSize);
//        IPage<OrderDetails> pageList = orderDetailsService.page(page, queryWrapper);
//        return Result.ok(pageList);
//    }
//}
